import {BaseLayerType,LayerCatetory,LayerType} from '@/js/earth/EarthConstant'


export default {
  //地图相关配置
  MAP: {
    chinaExtent: [75, 12, 137, 55],
    ZoomLevels:
      [{
        name: '国家',
        level: 0,
        height: 2500000,
        mapLevel: [0, 3]
      }, {
        name: '省',
        level: 1,
        height: 1000000,
        mapLevel: [4, 6]
      }, {
        name: '地市',
        level: 2,
        height: 700000,
        mapLevel: [7, 8]
      }, {
        name: '区县',
        level: 3,
        height: 400000,
        mapLevel: [9, 12]
      }, {
        name: '乡镇',
        level: 4,
        height: 100000,
        mapLevel: [13, 15]
      }, {
        name: '村',
        level: 5,
        height: 10000,
        mapLevel: [16, 22]
      }],
  },

  // TerrainUrl:'http://10.240.142.3/chinadem',

  //底图图层组
  BaseLayers: [
    {
      name: BaseLayerType.Google影像,
      base: 'g1',       //底图
      label: 'g3',     //注记
      boundary: 't1',  //边界
    },
    {
      name: BaseLayerType.天地图影像,
      base: 't2',       //底图
      label: 't3',     //注记
      boundary: 't1',  //边界
    },
    {
      name: BaseLayerType.天地图矢量,
      base: 't4',       //底图
      label: 't5',     //注记
      boundary: 't1',  //边界
    },
    {
      name: BaseLayerType.天地图地形,
      base: 't6',       //底图
      label: 't5',     //注记
      boundary: 't1',  //边界
    },

    {
      name: BaseLayerType.Google地图,
      base: 'g0',       //底图
      label: 'g3',     //注记
      boundary: 't1',  //边界
    },
    {
      name: BaseLayerType.Google地形,
      base: 'g2',       //底图
      label: 'g3',     //注记
      boundary: 't1',  //边界
    }
  ],

  //图层配置type:  1:wmts   2:wms   3:xyz   4:mapserver
  Layers: [
    {
      id: 't1',
      name: '天地图边界',
      type: LayerType.WMTS,
      params: { //墨卡托
        url: 'http://t{s}.tianditu.com/ibo_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ibo&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'ibo',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'w',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 1,
        ZeroTilesY: 1,
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '3857'
      }
    },
    {
      id: 't2',
      name: '天地图影像',
      type:  LayerType.WMTS,
      params: { //经纬度
        url: 'http://t{s}.tianditu.com/img_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'img',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'c',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 2,
        ZeroTilesY: 1,
        tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22'],
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '4326'
      }
    },
    {
      id: 't3',
      name: '天地图影像注记',
      type:  LayerType.WMTS,
      params: {
        url: 'http://t{s}.tianditu.com/cia_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default.jpg&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'cia',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'c',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 2,
        ZeroTilesY: 1,
        tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22'],
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '4326'
      }
    },
    {
      id: 't4',
      name: '天地图矢量',
      type:  LayerType.WMTS,
      params: {
        url: 'http://t{s}.tianditu.com/vec_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'vec',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'c',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 2,
        ZeroTilesY: 1,
        tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22'],
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '4326'
      }
    },
    {
      id: 't5',
      name: '天地图矢量注记',
      type:  LayerType.WMTS,
      params: {
        url: 'http://t{s}.tianditu.com/cva_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cva&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default.jpg&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'cva',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'c',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 2,
        ZeroTilesY: 1,
        tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22'],
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '4326'
      }
    },
    {
      id: 't6',
      name: '天地图地形',
      type:  LayerType.WMTS,
      params: {
        url: 'http://t{s}.tianditu.com/ter_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=ec7fe0feda91baac20f7835cfdce24c5',
        layer: 'ter',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID: 'c',
        tileWidth: 256,
        tileHeight: 256,
        ZeroTilesX: 2,
        ZeroTilesY: 1,
        tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22'],
        subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
        srid: '4326'
      }
    },
    {
      id: 'g0',
      name: '谷歌地图',
      type:  LayerType.XYZ,
      params: {
        url: 'http://mt{s}.google.cn/vt/lyrs=m&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali',
        subdomains:'0123'
      }
    },
    {
      id: 'g1',
      name: '谷歌影像',
      type: LayerType.XYZ,
      params: {
        url: 'http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali',
        subdomains:'0123'
      }
    },
    {
      id: 'g2',
      name: '谷歌地形',
      type: LayerType.XYZ,
      params: {
        url: 'http://mt{s}.google.cn/vt/lyrs=p&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali',   // t p
        subdomains:'0123'
      }
    },
    {
      id: 'g3',
      name: '谷歌注记',
      type: LayerType.XYZ,
      params: {
        url: 'http://mt{s}.google.cn/vt/lyrs=h&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali',
        subdomains:'0123'
      }
    },
    {
      id: 'v1',
      name: '区划边界',
      type: LayerType.VTILE,
      params: {
        url: 'http://192.98.100.134:8091/mapserver/vmap/world_division/getMAP?styleId=style_world&tilesize=512&x={TileCol}&y={TileRow}&l={TileMatrix}',
        layer: 'world_division',
        style: 'default',
        format: 'image/png',
        tileMatrixSetID: 'c',
        tileMatrixLabels: ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'],
        tileWidth: 512,
        tileHeight: 512,
        srid: '4326'
      }
    },
  ],
}

